import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [

    {
    path: '/',
    redirect:"/home"
  },
   {
    path: '/home',
    name: 'Home',
    component: Home
  },
  {
    path: '/free',
    component: () => import( '../views/Free.vue')
  },
    {
    path: '/goods',
    component: () => import( '../views/Goods.vue')
  },
    {
    path: '/order',
    component: () => import( '../views/Order.vue')
  },
    {
    path: '/user',
    component: () => import( '../views/User.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
